1. Field of the Invention
The present invention relates to the handling of unexpected scheduling interruptions in data transmission for a wireless device. More specifically, the handling of scheduling interruptions between a radio link control (RLC) layer and a medium access control (MAC) layer is considered.
2. Description of the Prior Art
Many communications protocols typically utilize a three-layered approach to communications. Please refer to FIG. 1. FIG. 1 is a block diagram of the three layers in such a communications protocol. In a typical wireless environment, a first station 10 is in wireless communications with one or more second stations 20. An application 13 on the first station 10 composes a message 11 and has it delivered to the second station 20 by handing the message 11 to a layer 3 interface 12. The layer 3 interface 12 may also generate layer 3 signaling messages 12a for the purpose of controlling layer 3 operations between the first station 10 and the second station 20. An example of such a layer 3 signaling message is a request for ciphering key changes, which are generated by the layer 3 interfaces 12 and 22 of both the first station 10 and second station 20, respectively. The layer 3 interface 12 delivers either the message 11 or the layer 3 signaling message 12a to a layer 2 interface 16 in the form of layer 2 service data units (SDUs) 14. The layer 2 SDUs 14 may be of any size, and hold the data that the layer 3 interface 12 wishes delivered to the second station 20, be it data from the signaling message 12a or from the application message 11. The layer 2 interface 16 composes the SDUs 14 into one or more layer 2 protocol data units (PDUs) 18. Each layer 2 PDU 18 is of a fixed size, and is delivered to a layer 1 interface 19. The layer 1 interface 19 is the physical layer, transmitting data to the second station 20. The transmitted data is received by the layer 1 interface 29 of the second station 20 and reconstructed into one or more PDUs 28, which are passed up to the layer 2 interface 26. The layer 2 interface 26 receives the PDUs 28 and from them assembles one or more layer 2 SDUs 24. The layer 2 SDUs 24 are passed up to the layer 3 interface 22. The layer 3 interface 22, in turn, converts the layer 2 SDUs 24 back into either a message 21, which should be identical to the original message 11 that was generated by the application 13 on the first station 10, or a layer 3 signaling message 22a, which should be identical to the original signaling message 12a generated by the layer 3 interface 12 and which is then processed by the layer 3 interface 22. The received message 21 is passed to an application 23 on the second station 20. As a note regarding terminology used throughout this disclosure, a PDU is a data unit that is used by a layer internally to transmit and receive information, whereas an SDU is a data unit that is passed up to, or received from, an upper layer. Thus, a layer 3 PDU is exactly the same as a layer 2 SDU. Similarly, a layer 2 PDU could also be termed a layer 1 SDU. For purposes of the following disclosure, the shortened term “SDU” is used to indicate layer 2 SDUs (that is, layer 3 PDUs), and the term “PDU” should be understood as layer 2 PDUs (i.e., layer 1 SDUs).
Of particular interest is the layer 2 interface, which acts as a buffer between the relatively high-end data transmission and reception requests of the layer 3 interface, and the low-level requirements of the physical transmission and reception process. Please refer to FIG. 2. FIG. 2 is a diagram of a transmission/reception process from a layer 2 perspective. A layer 2 interface 32 of a transmitter 30, which may be either a base station or a mobile unit, receives a string of SDUs 34 from a layer 3 interface 33. The SDUs 34 are sequentially ordered from 1 to 5, and are of unequal sizes, as indicated by unequal lengths in the figure. The layer 2 interface 32 converts the string of SDUs 34 into a string of PDUs 36. The layer 2 PDUs 36 are sequentially ordered from 1 to 4, and are all of an equal length. The string of PDUs 36 is then sent off to the layer 1 interface 31 for transmission. A reverse process occurs at the receiver end 40, which may also be either a base station or a mobile unit, with a receiver layer 2 interface 42 assembling a received string of layer 2 PDUs 46 into a received string of layer 2 SDUs 44. Under certain transport modes, the multi-layered protocol will insist that the receiver layer 2 interface 42 presents the SDUs 44 to the layer 3 interface 43 in order. That is, the layer 2 interface 42 must present the SDUs 44 to the layer 3 interface 43 in the sequential order of the SDUs 44, beginning with SDU 1 and ending with SDU 5. The ordering of the SDUs 44 may not be scrambled, nor may a subsequent SDU be delivered to layer 3 until all of the prior SDUs have been delivered.
In line transmissions, such a requirement is relatively easy to fulfill. In the noisy environment of wireless transmissions, however, the receiver 40, be it a base station or a mobile unit, often misses data. Additionally, under some transmission modes, the layer 2 interface 32 of the transmitter 30 may actually discard some of the layer 2 SDUs 34 after a predetermined amount of time if the layer 2 SDUs 34 have been excessively delayed. This is due to a so-called discard timer, which is set for each SDU 34. When a discard timer for an SDU 34 expires, the SDU 34 is discarded, as well as any PDUs 36 associated with the SDU 34. Some layer 2 PDUs 46 in the received string of layer 2 PDUs 46 will therefore be missing, either due to deliberate discarding from the transmitting side 30, or from improper reception on the receiver side 40. Thus, ensuring that the layer 2 SDUs 44 are presented in order can pose a significant challenge. Even in an out-of-sequence delivery mode, in which the sequentially ordered delivery of the SDUs 44 is not enforced, a layer 2 SDU 44 cannot be presented until all of its composing layer 2 PDUs 46 have been correctly received.
Wireless protocols are carefully designed to address such problems. Generally speaking, there are two broad modes for transmitting and receiving data: acknowledged mode (AM) transport, and unacknowledged mode (UM) transport. For acknowledged mode data, the receiver 40 sends a special layer 2 acknowledging signal to the transmitter 30 to indicate successfully received layer 2 PDUs 46. AM PDUs 46 that are not successfully received can therefore be re-transmitted by the transmitter 30 to ensure proper reception. No such signaling is performed for UM data, and hence there is no re-transmission of UM PDUs 36. For purposes of the present invention, AM data is used by way of example, though UM data is equally applicable to the present discussion. Please refer to FIG. 3 with reference to FIG. 1. FIG. 3 is a simplified block diagram of an acknowledged mode data PDU 50, as defined in the 3GPP™ TS 25.322 V3.8.0 specification, which is included herein by reference. In general, there are two types of PDUs: a control PDU or a data PDU. Control PDUs are used by the layer 2 interfaces 16 and 26 to control data transmission and reception protocols, such as the above-mentioned layer 2 acknowledging signal that is used to acknowledge received data. This is somewhat analogous to the exchange of the signaling messages 12a and 22a of the layer 3 interfaces 12 and 22. However, the layer 2 interfaces 16 and 26 do not interpret or recognize the layer 3 signaling messages 12a and 22a (they are simply treated as SDU data), whereas the layer 2 interfaces 16 and 26 do recognize layer 2 control PDUs, and do not hand layer 2 control PDUs up to the layer 3 interfaces 12 and 22. Data PDUs are used to transmit SDU data, which is reassembled and presented to layer 3 as SDUs. The example PDU 50 is a data PDU, and is divided into several fields, as defined by the layer 2 protocol. The first field 51 is a single bit indicating that the PDU 50 is either a data or a control PDU. As the data/control bit 51 is set (i.e., equal to 1), the PDU 50 is marked as a data PDU. The second field 52 is a sequence number field 52, and for AM transport is twelve bits long. Successive PDUs 18, 28 have successively higher sequence numbers 52, and in this way the second station 20 can properly reassembled layer 2 PDUs 28 to form layer 2 SDUs 24. For example, if a first PDU 18 is transmitted with a sequence number 52 equal to 536, a sequentially next PDU 18 would be transmitted with a sequence number 52 equal to 537, and so forth. A re-transmitted PDU 18 may have a sequence number 52 of 535, indicating that it is to be inserted sequentially prior to the PDU 18 with a sequence number of 536, though it was physically received at a later time. By assembling received data PDUs 50 in their proper sequential order according to their respective sequence numbers 52, the correct reconstruction of SDU data is ensured. The sequence number 52 enables re-transmitted PDUs 50 to be inserted into their proper sequential position with respect to other received PDUs 50. In this manner, the re-transmission of data is supported. A single polling bit 53 follows the sequence number field 52, and when set indicates that the receiver (i.e., the second station 20) should respond with an acknowledgment status PDU, which is one kind of control PDU that is used to indicate the reception status of received PDUs 28. The first station 10 sets the polling bit 53 to 1 to request the second station 20 to send an acknowledgment status control PDU. Bit 54 is reserved and is cleared to zero. The next bit 55a is an extension bit, and when set indicates the presence of an immediately following length indicator (LI). An LI may be either 7 bits long or 15 bits long, and is used to indicate the ending position of a layer 2 SDU within the layer 2 PDU 50. If a single SDU completely fills the data region 58 of the PDU 50, then the bit 55a would be zero, thereby indicating that no LI is present. In the example PDU 50, however, there are two layer 2 SDUs ending in the layer 2 PDU 50: SDU_157a and SDU_257b. There must, therefore, be two LIs to indicate the respective ends of the SDU_157a and the SDU_257b. A PDU following the PDU 50 (i.e., sequentially after, as indicated by the sequence number 52) would hold the LI for SDU_357c. The first LI, LI1, is in field 56a following the extension bit field 55a, and marks the end of the SDU_157a. LI1 56a has an extension bit 55b that is set, indicating the presence of another LI, LI2 in field 56b. LI2 56b indicates the ending position of the SDU_257b, and has an extension bit 55c that is cleared, signifying that there are no more LIs, and that a data region 58 is thus beginning. The data region 58 is used to hold the actual SDU data.
Please refer to FIG. 4 in conjunction with FIG. 5. FIG. 4 is a more detailed block diagram of a prior art layer 2 interface 60. FIG. 5 is a timing diagram of transmission time intervals (TTIs) 72. The layer 2 interface 60 comprises a radio link control (RLC) layer 62 on top of, and in communications with, a medium access control (MAC) layer 64. Such an arrangement can be found, for example, in the 3GPP™ specification TS 25.321 V3.9.0, which is included herein by reference. The MAC layer 64 acts as an interface between the RLC layer 62 and the layer 1 interface 61. From an upper-layer perspective (the RLC layer 62 and higher layers), many channels may be established, each with its own transport parameters. Functionally, however, these channels must be consolidated into a single stream for presentation to the physical layer 1 interface 61. This is one of the main purposes of the MAC layer 64. The MAC layer 64 divides the transmission of PDUs 63, which the MAC layer 64 receives from each RLC layer 62, into a series of transmission time intervals (TTIs) 72 for that channel. For each channel, every TTI 72 for that channel has an interval length that is identical to the other TTIs 72 for that channel, such as a 20 milliseconds (ms) interval. However, TTIs 72 may vary in duration from channel to channel, that is, from RLC layer 62 to RLC layer 62. For the present discussion, only a single channel (i.e., a single RLC layer 62) is assumed, though multiple channels are possible. Within the time span of each TTI 72 for the channel, the MAC layer 64 sends off a set 74 of transport blocks 74a to the layer 1 interface 61 to be transmitted. The set 74 of transport blocks 74a consists of a predetermined number of the transport blocks 74a. Each of the transport blocks 74a comprises one RLC PDU 75 and may optionally carry a MAC header 76. Within a TTI 72, the RLC PDUs 75, and thus the transport blocks 74a within the TTI 72, are all of the same length. The number of RLC PDUs 75 (i.e., transport blocks 74a) within each transport block set 74 between TTIs 72 may change. For example, in FIG. 5 the first TTI 72 transmits six PDUs 75, and the subsequent TTI 72 transmits three PDUs 75. The actual data size of the PDUs 75 may also vary from TTI 72 to TTI 72, but is always the same within each TTI 72. Consequently, prior to transmission for each TTI 72, the MAC layer 64 informs the RLC layer 62 of the number of PDUs 75 required for the TTI 72, and the size requirements the PDUs 75 within the TTI 72. This is termed transport format combination (TFC) selection, and is used to schedule the transmission of data from the RLC layer 62 to the MAC layer 64. TFC selection enables the MAC layer 64 to juggle the various requirements of the RLC layers 62 to most efficiently stream data into the physical layer 161. The RLC layer 62 composes SDUs 65a, held in a buffer 65, into appropriately sized PDUs 65b, and delivers the required number of PDUs 65b to the MAC layer 64, as required by the TFC selection. As noted, the MAC layer 64 may optionally add a MAC header 76 to each RLC PDU 75 to generate the transport blocks 74a for the transport block set 74, and then the transport block set 74 containing the PDUs 65b is sent off to the layer 1 interface 61 for transmission.
Please refer to FIG. 6 with reference to FIG. 4. FIG. 6 is a timing diagram for TFC selection according to the prior art. To send off at least a portion of the SDU data 65a in a TTI 82, TFC selection is performed in a TTI 81 immediately prior to the TTI 82. Within the TTI 81, the RLC layer 62 present RLC entity information 84 to the MAC layer 64. The RLC entity information 84 informs the MAC layer 64 of how much SDU data 65a the RLC layer 62 has awaiting transmission. The MAC layer 64 responds to the RLC entity information 84 with a TFC data request 86. The TFC data request 86 instructs the RLC layer 62 of the number of PDUs 65b to submit to the MAC layer 64, and the size of the PDUs 65b so submitted. This may or may not be sufficient to cover all of the SDU data 65a. In the event that it is not, the RLC layer 62 would have to perform another TFC selection process within the TTI 82 to transmit the remaining SDU data 65a in a subsequent TTI 83. In either event, the RLC layer 62 segments the appropriate number of SDUs 65a into the requested number of properly sized PDUs 65b. These PDUs 65b are delivered as a block 88 to the MAC layer 64. Within the TTI 82, the MAC layer 64 processes the block 88 for delivery to the layer 1 interface 61, and TFC selection is repeated in TTI 82 for data transmission in TTI 83. The SDUs 65a that have been segmented into PDUs 65b can be removed from the buffer 65.
SDUs 65a may also be removed from the buffer 65 due to timeout. Each SDU 65a can have an expiration time, which is tracked by a discard timer. If the discard timer indicates that an SDU 65a has exceeded its expiration time, the expired SDU 65a is removed from the buffer 65 and so is no longer available for transmission. From the perspective of the RLC layer 62, this is a seemingly random event that may occur at any time. In particular, such a discarding event may occur after the submission of the RLC entity information 84, leaving the RLC layer 62 with less (or even no) SDU data 65a than was indicated in the RLC entity information 84. However, once the MAC layer 64 responds to the RLC entity information 84 with the TFC data request 86, the RLC layer 62 must provide the appropriate block 88 having the requisite number of, and sized, PDUs 65b. Failure to do so can lead to software failure of the wireless device. This is a criticality in the scheduling of data transmission between the RLC layer 62 and the MAC layer 64, and has been accounted for in the prior art. In the event that an SDU 65a is to be discarded due to timeout from a discard timer, and if the RLC layer 62 has already indicated to the MAC layer 64 that the SDU 65a is ready for transmission in the RLC entity information 84, actual discarding of the SDU 65a is delayed until the TTI 82. By doing so, the RLC layer 62 is assured of having sufficient SDU data 65a to form the block 88. In the event that the expired SDU 65a is not required for the block 88, the expired SDU 65a may be safely discarded in the TTI 82 prior to the next TFC selection event for the TTI 83.
However, other unexpected data interruption events may occur, which the prior art is unable to handle. Please refer back to FIG. 1 with reference to FIGS. 4 and 6. Most of these unexpected data interruptions are the result of command primitives sent from the layer 3 interface 12 to the layer 2 interface 16, and hence are unexpected data interruptions from the standpoint of the RLC layer 62. These include stop, suspend and re-establish command primitives. Additionally, a layer 2 reset event can also be a source of unexpected data interruptions. The layer 3 interface 12 initiates a stop operation on the layer 2 interface 16 when the layer 3 interface 12 decides to change base stations. A stop event requires the layer 2 interface 12 to immediately stop transmitting SDU data 65a. Hence, the PDUs 65b are effectively pulled from being delivered to the MAC layer 64, even though a TFC data request 86 may be pending. A re-establish operation is initiated by the layer 3 interface 12 with a re-establish command primitive sent from the layer 3 interface 12 to the layer 2 interface 16 to reestablish a channel. As the name of the command primitive indicates, a channel is completely shut down, and then re-established. All SDU data 65a, and associated PDUs 65b, are thus necessarily discarded when the channel is shut down. Again, this may leave the MAC layer 64 hanging from an unfulfilled TFC data request 86 for the channel being re-established. A suspend operation is performed by the layer 3 interface 12 when the layer 3 interface 12 decides to change the ciphering configuration between the first station 10 and the second station 20. A suspend primitive is issued from the layer 3 interface 12 to the layer 2 interface 16 with a parameter “n”. This parameter “n” instructs the layer 2 interface to stop transmitting data after “n” more PDUs 65b have been sent. The purpose of this parameter “n” is to allow sufficient time, in terms of PDUs 65b, for the first station 10 to perform ciphering key synchronization with the second station 20. Generally, if “n” is large enough, the RLC layer 62 will have sufficient warning so as to be able to “plan ahead” and not leave a TFC data request 86 unfulfilled. However, if “n” is small, the RLC layer 62 may have to pull PDUs 65b that were already scheduled for transmission, and thus will not be able to fulfill the TFC data request 86. Finally, a reset operation is performed by the layer 2 interface 16 when communication errors are detected along a channel. These errors are, by nature, unexpected events, and either the first station 10 or the second station 20 may initiate a reset operation. A reset operation requires that all state variables and all buffers for a channel be cleared or set to default values. Hence, the SDUs 65a and PDUs 65b are removed under a reset operation, which may leave the MAC layer 64 hanging, awaiting response from the TFC data request 86.